Colin Walters [Thu, 7 May 2015 02:19:05 +0000 (22:19 -0400)]
sysroot: Add a try_lock() API
The blocking locking API wasn't sufficient for use in the rpm-ostree
daemon; it really wants to know if the lock is held, then continue to
do other things (like service DBus requests), and get notification
when the lock is available.
We also add an async variant that can be called if the lock is not
available.
Implement a higher level "loop until lock is available" method in the
`ostree admin` commandline.
Matthew Barnes [Thu, 7 May 2015 21:50:22 +0000 (17:50 -0400)]
repo: Simplify sign_data() a little
Use ot_gpgme_data_output() to wrapper a GOutputStream.
Matthew Barnes [Thu, 7 May 2015 21:02:37 +0000 (17:02 -0400)]
gpg: Add custom data buffers to wrapper GIO streams
ot_gpgme_data_input() and ot_gpgme_data_output(), shamelessly ripped
off from seahorse_gpgme_data_input() and seahorse_gpgme_data_output().
Matthew Barnes [Thu, 7 May 2015 20:02:39 +0000 (16:02 -0400)]
gpg: Fix ot_gpgme_error_to_gio_error()
Need to extract the error code from a gpgme_error_t, can't just compare
it directly.
Giuseppe Scrivano [Thu, 7 May 2015 19:59:30 +0000 (21:59 +0200)]
ot-fs-utils: remove empty line at EOF
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 4 May 2015 09:05:23 +0000 (11:05 +0200)]
summary: delete summary.sig on an update
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 30 Apr 2015 07:36:27 +0000 (09:36 +0200)]
tests: add a test for signed summary file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Wed, 29 Apr 2015 13:24:28 +0000 (15:24 +0200)]
pull: verify signature for the summary file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Wed, 29 Apr 2015 09:43:17 +0000 (11:43 +0200)]
summary: add new command line arguments to sign the summary file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Sun, 3 May 2015 20:40:27 +0000 (22:40 +0200)]
ostree-repo: add new API to sign the summary file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Tue, 28 Apr 2015 16:47:21 +0000 (18:47 +0200)]
pull: get rid of detached metadata for deltas
Once the summary file will be signed, we can validate the superblock
from there.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Tue, 28 Apr 2015 16:45:11 +0000 (18:45 +0200)]
pull: check that the superblock checksum is the same as in the summary
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Tue, 28 Apr 2015 15:46:18 +0000 (17:46 +0200)]
core: store information about delta files checksums
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Tue, 28 Apr 2015 15:45:37 +0000 (17:45 +0200)]
core: new function _ostree_parse_delta_name
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 27 Apr 2015 18:31:05 +0000 (20:31 +0200)]
summary: list the available static deltas
Write the information in the additional_metadata element for backward
compatibility.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 7 May 2015 09:13:43 +0000 (11:13 +0200)]
trivial-httpd: add option to specify the port
I use the trivial httpd server locally. Each time I restart the
server, I end up modifying manually the config file for other repos so
to point to the correct port. In this way I can just re-use the same
port.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 7 May 2015 09:09:17 +0000 (11:09 +0200)]
trivial-httpd: fix indentation
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Tue, 5 May 2015 16:14:39 +0000 (12:14 -0400)]
Remove unnecessary #include "libgsystem.h"
Matthew Barnes [Tue, 5 May 2015 16:13:09 +0000 (12:13 -0400)]
Use g_auto(GStrv) instead of gs_strfreev
Matthew Barnes [Tue, 5 May 2015 15:48:15 +0000 (11:48 -0400)]
Use g_autoptr(GVariantBuilder) instead of gs_unref_variant_builder
Matthew Barnes [Tue, 5 May 2015 15:47:07 +0000 (11:47 -0400)]
Use g_autoptr(GKeyFile) instead of gs_unref_keyfile
Matthew Barnes [Tue, 5 May 2015 15:45:46 +0000 (11:45 -0400)]
Use g_autoptr(GVariant) instead of gs_unref_variant
Matthew Barnes [Tue, 5 May 2015 15:44:40 +0000 (11:44 -0400)]
Use g_autoptr(GPtrArray) instead of gs_unref_ptrarray
Matthew Barnes [Tue, 5 May 2015 15:43:31 +0000 (11:43 -0400)]
Use g_autoptr(GHashTable) instead of gs_unref_hashtable
Matthew Barnes [Tue, 5 May 2015 15:41:50 +0000 (11:41 -0400)]
Use g_autoptr(GBytes) instead of gs_unref_bytes
Matthew Barnes [Tue, 5 May 2015 15:38:16 +0000 (11:38 -0400)]
Use g_autoptr(GChecksum) instead of gs_free_checksum
Matthew Barnes [Tue, 5 May 2015 14:33:53 +0000 (10:33 -0400)]
Use glnx_unref_object instead of gs_unref_object
For non-GIO object types, at least until autocleanup support for GObject
based types becomes more widespread.
Matthew Barnes [Mon, 4 May 2015 22:22:39 +0000 (18:22 -0400)]
Use g_autoptr() for GIO object types
GLib 2.44 supplies all the necessary autocleanup macros for GIO types,
and libglnx backports the relevant macros for ostree.
Matthew Barnes [Mon, 4 May 2015 21:58:26 +0000 (17:58 -0400)]
Use g_autofree instead of gs_free
Matthew Barnes [Mon, 4 May 2015 22:08:49 +0000 (18:08 -0400)]
Juggling libglnx.h includes
Matthew Barnes [Tue, 5 May 2015 21:41:13 +0000 (17:41 -0400)]
gpg: Add ostree_gpg_verify_result_describe_variant()
Needed for printing signature details in places where
OstreeGpgVerifyResult cannot go.
Colin Walters [Mon, 4 May 2015 16:46:32 +0000 (12:46 -0400)]
repo: Stop creating "transaction" symlink
This originally was a way that we detected the case where a pull was
interrupted. Later, we added `.commitpartial` files which also cover
this case.
See also https://github.com/GNOME/ostree/pull/85
We still want to honor their existence (and unlink them) in case an
old version of ostree was in use, but I believe it's safe to stop
creating them now.
The only case where this would break is if you have a version of
ostree that predates commitpartial in your rollback history, but such
old versions are no longer in use by operating systems I support at
least.
Closes: https://github.com/GNOME/ostree/pull/100
Matthew Barnes [Wed, 6 May 2015 14:28:31 +0000 (10:28 -0400)]
libglnx: Pick up bugfix and backports
Need more autocleanup backports for GIO types.
Colin Walters [Mon, 6 Apr 2015 18:19:08 +0000 (14:19 -0400)]
Teach fsck about partial commits
An OSTree user noticed that `ostree fsck` would produce `missing
object` errors in the case of interrupted pulls.
It's possible to do e.g. `ostree pull --subpath=/usr/share/rpm ...`,
which gets you just that portion of the commit. The use case for this
was being able to see what changes would appear in an update before
actually downloading all of it.
(I think this would be better covered by static deltas, but those
aren't final yet, and `--subpath` predates it)
Further, `.commitpartial` is used as a successor to the `transaction`
symlink for more precise knowledge in the case where a pull was
interrupted that we needed to resume scanning.
So it makes sense for `ostree fsck` to be aware of it.
Colin Walters [Sun, 5 Apr 2015 18:07:03 +0000 (14:07 -0400)]
core: Cleanup commitpartial file with fd-relative lookups
First, this is just a general continuation of the `GFile -> openat`
transition.
Second, it's preparatory work for fsck to gain awareness of partial
commits.
Giuseppe Scrivano [Tue, 5 May 2015 14:28:11 +0000 (16:28 +0200)]
doc: remove unknown parameter from inline documentation
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Tue, 5 May 2015 14:24:38 +0000 (10:24 -0400)]
repo: Fix an obvious typo
Giuseppe Scrivano [Tue, 5 May 2015 14:20:18 +0000 (16:20 +0200)]
libglnx: fix reference to commit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Mon, 4 May 2015 22:35:52 +0000 (18:35 -0400)]
sysroot: Add an API to lock
If a system administrator happens to type `ostree admin upgrade`
multiple times, currently that will lead to a potentially corrupted
system.
I originally attempted to do locking *internally* in `libostree`, but
that didn't work out because currently a number of the commands
perform multi-step operations that all need to be serialized. All of
the current code in `ostree admin deploy` is an example.
Therefore, allow callers to perform locking, as most of the higher
level logic is presently implemented there.
At some point, we can revisit having internal locking, but it will be
difficult. A more likely approach would be similar to Java's approach
with concurrency on iterators - a "fail fast" method.
Matthew Barnes [Mon, 4 May 2015 16:00:54 +0000 (12:00 -0400)]
Fix build when using GLib < 2.44
Giuseppe Scrivano [Tue, 28 Apr 2015 09:56:53 +0000 (11:56 +0200)]
pull: the commit size in the summary is not for the detached metadata
Use the size specified in the summary file only for the not detached
metadata.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Fri, 1 May 2015 19:19:20 +0000 (15:19 -0400)]
gpg: Fix _ostree_gpg_verifier_add_keyring()
The function never fails, but its API makes it look like it can.
Fortunately it's private, so just fix it.
Matthew Barnes [Wed, 29 Apr 2015 15:09:40 +0000 (11:09 -0400)]
ostree: Split up "remote" subcommands
To make room for "remote gpg-import", which will be non-trivial.
ot-builtin-remote.c was already a little too crowded anyway.
Also while we're at it, port this bit of code away from libgsystem.
Matthew Barnes [Thu, 30 Apr 2015 15:06:24 +0000 (11:06 -0400)]
repo: Initialize GPGME in instance init()
Initially I had this in class_init() but there it would get invoked
during introspection scanning.
Matthew Barnes [Mon, 27 Apr 2015 01:25:35 +0000 (21:25 -0400)]
libotutil: Add ot_gpgme_ctx_tmp_home_dir()
Currently used for signature verification, will also be used for
importing GPG keys.
Matthew Barnes [Sun, 26 Apr 2015 22:08:20 +0000 (18:08 -0400)]
libotutil: Establish a place for GPG utilities
Add ot-gpg-utils.[ch] and move _ostree_gpg_error_to_gio_error() here.
Giuseppe Scrivano [Mon, 27 Apr 2015 09:15:40 +0000 (11:15 +0200)]
show: add option --gpg-homedir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Mon, 27 Apr 2015 08:59:34 +0000 (10:59 +0200)]
gpg: do not use secring.gpg
It contains the secret keyring
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 24 Apr 2015 10:37:49 +0000 (12:37 +0200)]
g_output_stream_splice: check correctly the error code
While at it, change the style of other two occurrences.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Fri, 24 Apr 2015 13:42:28 +0000 (15:42 +0200)]
test-auto-summary.sh properly quote arguments to assert_streq
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Tue, 21 Apr 2015 20:20:28 +0000 (16:20 -0400)]
pull: Always request detached metadata for commits
Always request detached metadata for commit objects, even if we already
have the commit object. This ensures we fetch any post facto detached
metadata updates such as new GPG signatures.
https://bugzilla.gnome.org/748220
Micah Abbott [Thu, 23 Apr 2015 18:11:33 +0000 (14:11 -0400)]
reset: update help output
The inline help for 'ostree reset' now correctly shows that it
requires a REF and a COMMIT as arguments.
Giuseppe Scrivano [Tue, 21 Apr 2015 21:04:28 +0000 (23:04 +0200)]
README.md: fix typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Mon, 20 Apr 2015 15:41:54 +0000 (11:41 -0400)]
deploy: Drop a fsync, use fd-relative APIs
Now that we can rely on `syncfs()`, drop another fsync in the deploy
path. While we're here, convert it to fd-relative.
Colin Walters [Sun, 19 Apr 2015 16:34:01 +0000 (12:34 -0400)]
deploy: Drop fsync of modified config files
These fsyncs were added for what turned out to be a fairly bogus
reason; I was hitting read errors from extlinux after upgrades and out
of conservatisim tried adding fsync calls, but the *actual* problem
was that extlinux didn't support 64 bit ext4. Now that at least for
Project Atomic hosts we're just targeting grub2, we can drop these
fsync calls and rely on `syncfs()` being both faster and catching any
errors.
Colin Walters [Tue, 14 Apr 2015 17:47:08 +0000 (13:47 -0400)]
deploy: Use syncfs() in addition to sync()
For some sort of crazy reason, the `sync()` system call doesn't
actually return an error code, even though from what I can tell in the
kernel it wouldn't be terribly hard to add.
Regardless though, it is better for userspace apps to use `syncfs()`
to avoid flushing filesystems unrelated to what they want to sync. In
the case of OSTree, this does matter - for example you might have a
network mount point backing your database, and we don't want to block
upgrades on syncing it.
This change is safe because we're doing syncfs in *addition* to the
previous global `sync()` (a revision from an earlier patch).
Now because OSTree only touches the `/` mount point which covers the
repository, the deployment roots (including their copy of `/etc`), as
well as `/boot`, we should at some point later be able to drop the
`sync()` call. Note that on initial system installs we do relabel
`/var` but that shouldn't happen at ostree time - any new directories
are taken care of via `systemd-tmpfiles` on boot.
Colin Walters [Tue, 21 Apr 2015 01:02:25 +0000 (21:02 -0400)]
status: Don't crash if we deployed a local refspec
In the case we built a local tree, we'd pass `NULL` as a remote down
to the GPG checking code. Noticed this in the test suite.
Colin Walters [Sun, 19 Apr 2015 19:25:05 +0000 (15:25 -0400)]
sysroot: Close sysroot fd in finalize
Just noticed this while I was going to add another one there.
Colin Walters [Fri, 17 Apr 2015 20:15:55 +0000 (16:15 -0400)]
libglnx: Update from master
No real changes, but I'd like to use some of the new APIs later.
Colin Walters [Fri, 17 Apr 2015 18:16:08 +0000 (14:16 -0400)]
Release 2015.6
Colin Walters [Fri, 17 Apr 2015 13:13:31 +0000 (09:13 -0400)]
sysroot: Add ostree_sysroot_get_fd()
This way external programs like rpm-ostree can do fd-relative
operations on the deployment directories, like inspecting the RPM
database.
Closes: https://github.com/GNOME/ostree/pull/91
Matthew Barnes [Fri, 17 Apr 2015 16:43:46 +0000 (12:43 -0400)]
main: Tweak GPG output to match rpm-ostree
Matthew Barnes [Fri, 17 Apr 2015 13:00:17 +0000 (09:00 -0400)]
sysroot: Cache an OstreeRepo instance
Rather than returning a new OstreeRepo instance in each call to
ostree_sysroot_get_repo(), cache one internally so the same instance
is returned each time.
Matthew Barnes [Wed, 15 Apr 2015 19:04:53 +0000 (15:04 -0400)]
admin: Conditionally show GPG signatures in status command
Only if GPG verification is enabled for a deployment's origin.
Matthew Barnes [Wed, 15 Apr 2015 18:14:55 +0000 (14:14 -0400)]
repo: Add ostree_repo_remote_get_gpg_verify()
Trivial function, but it does at least centralize the default value.
Matthew Barnes [Tue, 14 Apr 2015 00:26:21 +0000 (20:26 -0400)]
pull: Print GPG signature status as soon as its known
Matthew Barnes [Mon, 13 Apr 2015 17:21:17 +0000 (13:21 -0400)]
repo: Add a "gpg-verify-result" signal
Emitted during a pull operation upon GPG verification (if enabled).
Applications can connect to this signal to output the verification
results if desired.
Matthew Barnes [Wed, 8 Apr 2015 18:50:55 +0000 (14:50 -0400)]
repo: Improve error handling in sign_data()
Use _ostree_gpg_error_to_gio_error() so the actual GPG error message is
included in the GError. Then apply an "Unable to blah: " message prefix.
Colin Walters [Wed, 8 Apr 2015 00:54:37 +0000 (20:54 -0400)]
reset: Don't enforce parent commits
First, git doesn't do this, and whatever Linus thinks is right or
something.
Second specifically to OSTree, it's quite common to not have
intermediate commits. If one wants to reset a ref in order to prune
data after a deployment, the parentage check will fail.
Closes: https://github.com/GNOME/ostree/pull/87
Colin Walters [Tue, 14 Apr 2015 19:53:51 +0000 (15:53 -0400)]
libglnx: Update to latest
This pulls in more fixes for writes.
Giuseppe Scrivano [Thu, 2 Apr 2015 10:33:07 +0000 (12:33 +0200)]
config: add new parameter "commit-update-summary" to core section
When set to true, the summary file is automatically updated after
a commit.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 2 Apr 2015 09:58:16 +0000 (11:58 +0200)]
summary: write the contents to a temporary file
do not write directly to the summary file but use a temporary file
first. It avoids to create an empty file if "ot_util_variant_save"
fails.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Tue, 14 Apr 2015 07:56:13 +0000 (09:56 +0200)]
_ostree_repo_file_replace_contents: make buf const
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Tue, 14 Apr 2015 12:53:48 +0000 (08:53 -0400)]
tests: Fix root uid check in test-commit-sign.sh
Matthew Barnes [Tue, 14 Apr 2015 12:49:18 +0000 (08:49 -0400)]
libglnx: Pick up file permission regression fix
https://bugzilla.gnome.org/747813
Colin Walters [Mon, 13 Apr 2015 17:28:02 +0000 (13:28 -0400)]
repo: Add a private helper to replace a file, honoring fsync policy
Extracted from discussion in https://github.com/GNOME/ostree/pull/83
Colin Walters [Thu, 9 Apr 2015 01:54:28 +0000 (21:54 -0400)]
refs: Use *at for writes, honor repo fsync flag
I was looking at https://bugzilla.gnome.org/show_bug.cgi?id=738954
which wants us to ensure we chown() the refs. As part of that,
I did a generic conversion to use `*at()` (which naturally gives
us more low level control so we can call `fchown` etc.
This patch also sneaks in a change to respect the repo's
`disable_fsync` flag - if fsync is not set, then we never
`fdatasync()` (unlike the `g_file_replace_contents()` default. Also
unlike it, if fsync is enabled, we *always* sync even if the file
didn't exist.
Giuseppe Scrivano [Mon, 13 Apr 2015 09:37:18 +0000 (11:37 +0200)]
ostree_repo_checkout_tree_at: remove @subpath documentation
It is not an argument of the function.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Colin Walters [Thu, 12 Feb 2015 14:13:30 +0000 (09:13 -0500)]
Add an API to set/unset a deployment tree's mutability
This will be used by rpm-ostree to unset the immutable bit temporarily
in order to do package layering. We could add an API to deploy a tree
without the immutable bit, but this is simpler.
Colin Walters [Thu, 9 Apr 2015 13:14:52 +0000 (09:14 -0400)]
pull-metalink: Don't print error output when we expect failure
I think I added `cat err.txt` to debug, but it's not necessary now.
Matthew Barnes [Tue, 31 Mar 2015 23:52:19 +0000 (19:52 -0400)]
admin: Show GPG signatures in status command
Matthew Barnes [Fri, 20 Mar 2015 16:07:03 +0000 (12:07 -0400)]
gpg: Add ostree_gpg_verify_result_describe()
Internalizes the signature output of "ostree show" so it can be reused
elsewhere.
Colin Walters [Tue, 7 Apr 2015 20:18:45 +0000 (16:18 -0400)]
Release 2015.5
Colin Walters [Mon, 6 Apr 2015 22:29:01 +0000 (18:29 -0400)]
ostree_repo_checkout_tree_at: New API for checkouts
rpm-ostree currently uses ostree_repo_checkout_tree(), which as a side
effect will use the uncompressed objects cache by default. This is
rather annoying if you're using rpm-ostree on a server-side
repository, because if you then rsync the repo, you'll be syncing out
the uncompressed objects unless you exclude them.
We added the ability to disable the uncompressed cache in the
repository config to fix this, but it's better to allow application
control over this. The uncompressed cache will in some future version
become opt in as well.
This new API further:
- Drops the `GFile` usage in favor of `openat` APIs
- Improves ergonomics by avoiding callers having to query the source
`GFileInfo` (and carry around a copy of `OSTREE_GIO_FAST_QUERYINFO`)
- Has a more extensible options structure
Per the comment, I rather crudely have the `ostree checkout` builtin
call both APIs to ensure some testing coverage.
However, I'd like to in the future have easier-to-set-up testing code
that calls `libtest.sh` to set up dummy data.
Colin Walters [Sat, 4 Apr 2015 14:49:28 +0000 (10:49 -0400)]
pull: Handle remote web server not honoring range requests
It's valid for the remote server to say 200 OK and give us the entire
file instead of a 206 Partial Content, and in that case we should blow
away the previous cached data, rather than blindly appending to it and
thus creating multiple copies of the data inside the file.
This problem primarily occurs when we do have the complete file, and
we're interrupted, then try again, where the new process didn't record
the download was already complete. We do a range request for bytes
past the end, and some web servers (e.g. Akamai) will return 200 OK
with the whole content again, rather than a 416 Requested Range Not
Satisfiable.
Thus we could also fix this by saner caching strategy - since we know
the file is complete, rename it again to $checksum.done or something
before it's processed. (Or really, rework how we do caching more
intelligently in general).
This fixes the issue that interrupted pulls failed with such
webservers, although repeated attempts would eventually succeed
because we'd unlink files that failed to pull.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=
1207292
Colin Walters [Mon, 6 Apr 2015 15:10:56 +0000 (11:10 -0400)]
tests: Verify that the pull error was from interruption
While working on https://github.com/GNOME/ostree/pull/84 I wanted to
verify that nothing else was going wrong.
Matthew Barnes [Mon, 6 Apr 2015 16:08:27 +0000 (12:08 -0400)]
core: Actually allow none in ostree_parse_refspec()
Both 'out_remote' and 'out_ref' parameters already have the (allow-none)
annotation but that wasn't actually true.
Daniel Svensson [Mon, 6 Apr 2015 14:25:03 +0000 (10:25 -0400)]
tests: Missing linker flags for test-rollsum
Reproducable on Debian; Fedora lets it slide.
Colin Walters [Sun, 5 Apr 2015 13:18:42 +0000 (09:18 -0400)]
dist-packaging: Don't delete 91-ostree.preset, do clean old rpms/sources
We have to copy the sources to avoid rpmbuild deleting them. But on
the other hand there's no reason for old sources to stick around.
Giuseppe Scrivano [Thu, 2 Apr 2015 12:21:52 +0000 (14:21 +0200)]
tests: skip test-commit-sign.sh when not root
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 2 Apr 2015 12:21:29 +0000 (14:21 +0200)]
build: exclude .sig files from syntax-check
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 2 Apr 2015 12:16:57 +0000 (14:16 +0200)]
src/ostree/ot-main.c: drop empty newline at end of file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 2 Apr 2015 12:09:33 +0000 (14:09 +0200)]
tests/basic-test.sh: enable repo-noperm test only for non-root user
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Giuseppe Scrivano [Thu, 2 Apr 2015 08:16:31 +0000 (10:16 +0200)]
build: Drop libattr from the spec file
commit
534c4c20c3fa5ad9500ea96093a3ece7821a6056 already drops its
usage in the code.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Daniel Svensson [Wed, 1 Apr 2015 07:45:20 +0000 (09:45 +0200)]
build: Use glibc's xattr support instead of requiring libattr
Fixes the build on Debian, and is one library less.
Closes: #78
Colin Walters [Wed, 1 Apr 2015 10:21:34 +0000 (06:21 -0400)]
main: Only verify SUPERUSER flag if using default sysroot
The use case for non-default sysroots that I know of are:
1) The current test suite
2) Installers (Anaconda)
3) Inspecting VM disks
For 2) and 3), it'll quickly be obvious if they're not running as
root, and these are more obscure cases. We want to allow 1), and this
is a simple way to do it.
https://bugzilla.gnome.org/show_bug.cgi?id=747164
Matthew Barnes [Tue, 31 Mar 2015 23:48:55 +0000 (19:48 -0400)]
Include ostree-gpg-verify-result.h in ostree.h
Sam Thursfield [Tue, 31 Mar 2015 16:59:43 +0000 (12:59 -0400)]
core: Fix possible crash in ostree_mutable_tree_walk()
If the starting index is beyond the end of the list, it's a programming
error. Previously, the code was trying to raise a runtime error, but
actually causing a segfault.
This was detected by test code in test-mutable-tree.c, which is removed
in this commit because it should now not be possible to crash here.
https://bugzilla.gnome.org/747032
Giuseppe Scrivano [Thu, 26 Mar 2015 22:31:25 +0000 (23:31 +0100)]
bsdiff: change submodule location
The cleanup code was merged in the https://github.com/mendsley/bsdiff
repository, so just use it.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Matthew Barnes [Sun, 22 Feb 2015 21:06:39 +0000 (16:06 -0500)]
Add OSTREE_ADMIN_BUILTIN_FLAG_SUPERUSER
Indicates the command requires superuser privilege. Fails early with
a more helpful message than would otherwise be returned by libostree.
Currently all admin commands except 'status' require superuser.